<template>
  <div>
    <!-- 权限配置 -->
    <Dialog :visible="visible" :title="title" button-text="保存" class="single-column" @close="close">
      <el-table
        :data="tableData"
        style="width: 100%"
      >
        <el-table-column
          prop="date"
          label="菜单"
        />
        <el-table-column
          prop="name"
          label="查看权限"
        >
          <template>
            <el-checkbox v-model="checked" on-input="aaa" />
          </template>
        </el-table-column>
        <el-table-column
          prop="address"
          label="操作权限"
        >
          <template>
            <el-checkbox v-model="checked">今日预约</el-checkbox>
          </template>
        </el-table-column>
      </el-table>
    </Dialog>
  </div>
</template>
<script>
import Dialog from "@/components/Dialog";
export default {
  components: {
    Dialog,
  },
  data() {
    return {
      visible: false,
      title: '',
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄',
      }],
      checked: true,
    };
  },
  methods: {
    configure(name) {
      this.visible = true;
      this.title = '为' + name + '配置菜单权限';
    },
    aaa() {
      console.log(this.checked);
    },
    close() {
      this.visible = false;
    },
  },
};
</script>
